package org.sean.framework.sample;

import lombok.Builder;
import lombok.Data;
import org.sean.framework.bean.BaseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {
    @GetMapping("{id}")
    public BaseResult<User> getUser(@PathVariable("id") Long id) {
        return BaseResult.success(User.builder().id(1L).name("sean").build());
    }

    @Builder
    @Data
    static class User {
        Long id;
        String name;
    }
}
